﻿@{
    Layout = null;
}

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>新增教师</title>
    @Html.Partial("~/Views/Share/PublicHeader.cshtml")
</head>
<body>
    @Html.Partial("~/Views/Share/PublicTopNav2.cshtml")
    <div class="container">
        <div class="row">
            <h1 class="topTitle-h1">康复治疗微课程网络学习平台<br><small>广州中医药大学康复治疗微课程网络学习平台</small></h1>
        </div>
    </div>
    @Html.Partial("~/Views/Share/PublicAdminNaviMenu.cshtml", 0)
    <div class="container mainwrap">
        <div class="row">
            <div class="col-xs-2">
                <div class="dropdown theme-dropdown clearfix">
                    <a id="dropdownMenu1" href="#" role="button" class="sr-only dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
                        <li role="presentation">
                            <a role="menuitem" tabindex="-1" href="/UserInfo/TeacherList">
                                <span class="glyphicon glyphicon-user"></span> 教师列表
                            </a>
                        </li>
                        <li role="presentation" class="divider"></li>
                        <li class="active" role="presentation">
                            <a role="menuitem" tabindex="-1" href="javascript:void(0)">
                                <span class="glyphicon glyphicon-plus"></span> 新建教师
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="col-xs-10">
                <div class="panel panel-default mainwrap-part">
                    <div class="panel-heading">
                        <h3 class="panel-title">
                            <ol class="breadcrumb">
                                <li>教师用户管理</li>
                                <li class="active">新建教师</li>
                            </ol>
                        </h3>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <form class="form-horizontal" role="form">
                                <div class="form-group clearfix">
                                    <label class="control-label col-xs-2">用户名：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control input-md" id="Jaccount" />
                                    </div>
                                    <div class="col-xs-4"></div>
                                </div>
                                <div class="form-group clearfix">
                                    <label class="control-label col-xs-2">姓名：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control input-md" id="Jrealname" />
                                    </div>
                                    <div class="col-xs-4"></div>
                                </div>
                                <div class="form-group clearfix">
                                    <label class="control-label col-xs-2">初始密码：</label>
                                    <div class="col-xs-6">
                                        <input type="password" class="form-control input-md" id="Jpw" />
                                    </div>
                                    <div class="col-xs-4"></div>
                                </div>
                                <div class="form-group clearfix">
                                    <label class="control-label col-xs-2">重复密码：</label>
                                    <div class="col-xs-6">
                                        <input type="password" class="form-control input-md" id="Jpw2" />
                                    </div>
                                    <div class="col-xs-4"></div>
                                </div>
                                <div class="form-group clearfix">
                                    <div class="col-xs-offset-2 col-xs-10">
                                        <button type="button" id="JaddTec" class="btn btn-success btn-md"><span class="glyphicon glyphicon-ok"></span> 新增 </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    @Html.Partial("~/Views/Share/PublicFooter.cshtml")
    @Html.Partial("~/Views/Share/PublicCommonJs.cshtml")
    <script>
        var account = $("#Jaccount"),
            realname = $("#Jrealname"),
            pwd = $("#Jpw"),
            pwd2 = $("#Jpw2");
        $("#JaddTec").bind("click", function () {
            var _account = account.val(),
                _realname = realname.val(),
                _pwd = pwd.val(),
                _pwd2 = pwd2.val();
            $.easyPost("/UserInfo/AddTeacher", {
                "Account": _account,
                "RealName": _realname,
                "Password": _pwd,
                "Password2": _pwd2
            }, function (data) {
                if (data.result) {
                    showTips.open("添加成功！");
                    clearall()
                    return;
                } else {
                    showTips.open(data.message);
                    return;
                }
            })
        })
        function clearall() {
            account.val("");
            realname.val("");
            pwd.val("");
            pwd2.val("");
        }
    </script>
</body>
</html>

